home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / xemacs.info-14.z / xemacs.info-14
Encoding:
GNU Info File  |  1998-05-21  |  49.5 KB  |  1,190 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo version
  2. 1.68 from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Diary Customizing,  Next: Hebrew/Islamic Entries,  Prev: Daylight Savings,  Up: Calendar Customization
  29.  
  30. Customizing the Diary
  31. .....................
  32.  
  33.    Ordinarily, the mode line of the diary buffer window indicates any
  34. holidays that fall on the date of the diary entries.  The process of
  35. checking for holidays can take several seconds, so including holiday
  36. information delays the display of the diary buffer noticeably.  If you'd
  37. prefer to have a faster display of the diary buffer but without the
  38. holiday information, set the variable `holidays-in-diary-buffer' to
  39. `nil'.
  40.  
  41.    The variable `number-of-diary-entries' controls the number of days
  42. of diary entries to be displayed at one time.  It affects the initial
  43. display when `view-diary-entries-initially' is `t', as well as the
  44. command `M-x diary'.  For example, the default value is 1, which says
  45. to display only the current day's diary entries.  If the value is 2,
  46. both the current day's and the next day's entries are displayed.  The
  47. value can also be a vector of seven elements: if the value is `[0 2 2 2
  48. 2 4 1]' then no diary entries appear on Sunday, the current date's and
  49. the next day's diary entries appear Monday through Thursday, Friday
  50. through Monday's entries appear on Friday, while on Saturday only that
  51. day's entries appear.
  52.  
  53.    The variable `print-diary-entries-hook' is a normal hook run after
  54. preparation of a temporary buffer containing just the diary entries
  55. currently visible in the diary buffer.  (The other, irrelevant diary
  56. entries are really absent from the temporary buffer; in the diary
  57. buffer, they are merely hidden.)  The default value of this hook does
  58. the printing with the command `lpr-buffer'.  If you want to use a
  59. different command to do the printing, just change the value of this
  60. hook.  Other uses might include, for example, rearranging the lines into
  61. order by day and time.
  62.  
  63.    You can customize the form of dates in your diary file, if neither
  64. the standard American nor European styles suits your needs, by setting
  65. the variable `diary-date-forms'.  This variable is a list of forms of
  66. dates recognized in the diary file.  Each form is a list of regular
  67. expressions (*note Regexps::.) and the variables `month', `day',
  68. `year', `monthname', and `dayname'.  The variable `monthname' matches
  69. the name of the month, capitalized or not, or its three-letter
  70. abbreviation, followed by a period or not; it matches `*'.  Similarly,
  71. `dayname' matches the name of the day, capitalized or not, or its
  72. three-letter abbreviation, followed by a period or not.  The variables
  73. `month', `day', and `year' match those numerical values, preceded by
  74. arbitrarily many zeros; they also match `*'.  The default value of
  75. `diary-date-forms' in the American style is
  76.  
  77.      ((month "/" day "[^/0-9]")
  78.       (month "/" day "/" year "[^0-9]")
  79.       (monthname " *" day "[^,0-9]")
  80.       (monthname " *" day ", *" year "[^0-9]")
  81.       (dayname "\\W"))
  82.  
  83. Emacs matches of the diary entries with the date forms is done with the
  84. standard syntax table from Fundamental mode (*note Syntax Tables:
  85. (lispref)Syntax Tables.), but with the `*' changed so that it is a word
  86. constituent.
  87.  
  88.    The forms on the list must be *mutually exclusive* and must not
  89. match any portion of the diary entry itself, just the date.  If, to be
  90. mutually exclusive, the pattern must match a portion of the diary entry
  91. itself, the first element of the form *must* be `backup'.  This causes
  92. the date recognizer to back up to the beginning of the current word of
  93. the diary entry.  Even if you use `backup', the form must absolutely
  94. not match more than a portion of the first word of the diary entry.
  95. The default value of `diary-date-forms' in the European style is this
  96. list:
  97.  
  98.      ((day "/" month "[^/0-9]")
  99.       (day "/" month "/" year "[^0-9]")
  100.       (backup day " *" monthname "\\W+\\<[^*0-9]")
  101.       (day " *" monthname " *" year "[^0-9]")
  102.       (dayname "\\W"))
  103.  
  104. Notice the use of `backup' in the middle form because part of the diary
  105. entry must be matched to distinguish this form from the following one.
  106.  
  107. 
  108. File: xemacs.info,  Node: Hebrew/Islamic Entries,  Next: Fancy Diary Display,  Prev: Diary Customizing,  Up: Calendar Customization
  109.  
  110. Hebrew- and Islamic-Date Diary Entries
  111. ......................................
  112.  
  113.    Your diary file can have entries based on Hebrew or Islamic dates, as
  114. well as entries based on our usual Gregorian calendar.  However, because
  115. the processing of such entries is time-consuming and most people don't
  116. need them, you must customize the processing of your diary file to
  117. specify that you want such entries recognized.  If you want Hebrew-date
  118. diary entries, for example, you must include these lines in your
  119. `.emacs' file:
  120.  
  121.      (setq nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
  122.      (setq nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
  123.  
  124. If you want Islamic-date entries, include these lines in your `.emacs'
  125. file:
  126.  
  127.      (setq nongregorian-diary-listing-hook 'list-islamic-diary-entries)
  128.      (setq nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
  129.  
  130. If you want both Hebrew- and Islamic-date entries, include these lines:
  131.  
  132.      (setq nongregorian-diary-listing-hook
  133.            '(list-hebrew-diary-entries list-islamic-diary-entries))
  134.      (setq nongregorian-diary-marking-hook
  135.            '(mark-hebrew-diary-entries mark-islamic-diary-entries))
  136.  
  137.    Hebrew- and Islamic-date diary entries have the same formats as
  138. Gregorian-date diary entries, except that the date must be preceded with
  139. an `H' for Hebrew dates and an `I' for Islamic dates.  Moreover,
  140. because the Hebrew and Islamic month names are not uniquely specified
  141. by the first three letters, you may not abbreviate them.  For example,
  142. a diary entry for the Hebrew date Heshvan 25 could look like
  143.  
  144.      HHeshvan 25 Happy Hebrew birthday!
  145.  
  146. and would appear in the diary for any date that corresponds to Heshvan
  147. 25 on the Hebrew calendar.  Similarly, an Islamic-date diary entry
  148. might be
  149.  
  150.      IDhu al-Qada 25 Happy Islamic birthday!
  151.  
  152. and would appear in the diary for any date that corresponds to Dhu
  153. al-Qada 25 on the Islamic calendar.
  154.  
  155.    As with Gregorian-date diary entries, Hebrew- and Islamic-date
  156. entries are nonmarking if they are preceded with an ampersand (`&').
  157.  
  158.    There are commands to help you in making Hebrew- and Islamic-date
  159. entries to your diary:
  160.  
  161. `i h d'
  162.      Add a diary entry for the Hebrew date corresponding to the
  163.      selected date (`insert-hebrew-diary-entry').
  164.  
  165. `i h m'
  166.      Add a diary entry for the day of the Hebrew month corresponding to
  167.      the selected date (`insert-monthly-hebrew-diary-entry').
  168.  
  169. `i h y'
  170.      Add a diary entry for the day of the Hebrew year corresponding to
  171.      the selected date (`insert-yearly-hebrew-diary-entry').
  172.  
  173. `i i d'
  174.      Add a diary entry for the Islamic date corresponding to the
  175.      selected date (`insert-islamic-diary-entry').
  176.  
  177. `i i m'
  178.      Add a diary entry for the day of the Islamic month corresponding
  179.      to the selected date (`insert-monthly-islamic-diary-entry').
  180.  
  181. `i i y'
  182.      Add a diary entry for the day of the Islamic year corresponding to
  183.      the selected date (`insert-yearly-islamic-diary-entry').
  184.  
  185.    These commands work exactly like the corresponding commands for
  186. ordinary diary entries: Move point to a date in the calendar window and
  187. the above commands insert the Hebrew or Islamic date (corresponding to
  188. the date indicated by point) at the end of your diary file and you can
  189. then type the diary entry.  If you want the diary entry to be
  190. nonmarking, give a numeric argument to the command.
  191.  
  192. 
  193. File: xemacs.info,  Node: Fancy Diary Display,  Next: Included Diary Files,  Prev: Hebrew/Islamic Entries,  Up: Calendar Customization
  194.  
  195. Fancy Diary Display
  196. ...................
  197.  
  198.    Diary display works by preparing the diary buffer and then running
  199. the hook `diary-display-hook'.  The default value of this hook hides
  200. the irrelevant diary entries and then displays the buffer
  201. (`simple-diary-display').  However, if you specify the hook as follows,
  202.  
  203.      (add-hook 'diary-display-hook 'fancy-diary-display)
  204.  
  205. then fancy mode displays diary entries and holidays by copying them into
  206. a special buffer that exists only for display.  Copying provides an
  207. opportunity to change the displayed text to make it prettier--for
  208. example, to sort the entries by the dates they apply to.
  209.  
  210.    As with simple diary display, you can print a hard copy of the buffer
  211. with `print-diary-entries'.  To print a hard copy of a day-by-day diary
  212. for a week by positioning point on Sunday of that week, type `7 d' and
  213. then do `M-x print-diary-entries'.  As usual, the inclusion of the
  214. holidays slows down the display slightly; you can speed things up by
  215. setting the variable `holidays-in-diary-buffer' to `nil'.
  216.  
  217.    Ordinarily, the fancy diary buffer does not show days for which
  218. there are no diary entries, even if that day is a holiday.  If you want
  219. such days to be shown in the fancy diary buffer, set the variable
  220. `diary-list-include-blanks' to `t'.
  221.  
  222.    If you use the fancy diary display, you can use the normal hook
  223. `list-diary-entries-hook' to sort each day's diary entries by their
  224. time of day.  Add this line to your `.emacs' file:
  225.  
  226.      (add-hook 'list-diary-entries-hook 'sort-diary-entries)
  227.  
  228. For each day, this sorts diary entries that begin with a recognizable
  229. time of day according to their times.  Diary entries without times come
  230. first within each day.
  231.  
  232. 
  233. File: xemacs.info,  Node: Included Diary Files,  Next: Sexp Diary Entries,  Prev: Fancy Diary Display,  Up: Calendar Customization
  234.  
  235. Included Diary Files
  236. ....................
  237.  
  238.    If you use the fancy diary display, you can have diary entries from
  239. other files included with your own by an "include" mechanism.  This
  240. facility makes possible the sharing of common diary files among groups
  241. of users.  Lines in the diary file of this form:
  242.  
  243.      #include "FILENAME"
  244.  
  245. includes the diary entries from the file FILENAME in the fancy diary
  246. buffer (because the ordinary diary buffer is just the buffer associated
  247. with your diary file, you cannot use the include mechanism unless you
  248. use the fancy diary buffer).  The include mechanism is recursive, by
  249. the way, so that included files can include other files, and so on; you
  250. must be careful not to have a cycle of inclusions, of course.  To
  251. enable the include facility, add lines as follows to your `.emacs' file:
  252.  
  253.      (add-hook 'list-diary-entries-hook 'include-other-diary-files)
  254.      (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
  255.  
  256. 
  257. File: xemacs.info,  Node: Sexp Diary Entries,  Next: Appt Customizing,  Prev: Included Diary Files,  Up: Calendar Customization
  258.  
  259. Sexp Entries and the Fancy Diary Display
  260. ........................................
  261.  
  262.    Sexp diary entries allow you to do more than just have complicated
  263. conditions under which a diary entry applies.  If you use the fancy
  264. diary display, sexp entries can generate the text of the entry depending
  265. on the date itself.  For example, an anniversary diary entry can insert
  266. the number of years since the anniversary date into the text of the
  267. diary entry.  Thus the `%d' in this dairy entry:
  268.  
  269.      %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
  270.  
  271. gets replaced by the age, so on October 31, 1990 the entry appears in
  272. the fancy diary buffer like this:
  273.  
  274.      Arthur's birthday (42 years old)
  275.  
  276. If the diary file instead contains this entry:
  277.  
  278.      %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
  279.  
  280. the entry in the fancy diary buffer for October 31, 1990 appears like
  281. this:
  282.  
  283.      Arthur's 42nd birthday
  284.  
  285.    Similarly, cyclic diary entries can interpolate the number of
  286. repetitions that have occurred:
  287.  
  288.      %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
  289.  
  290. looks like this:
  291.  
  292.      Renew medication (5th time)
  293.  
  294. in the fancy diary display on September 8, 1990.
  295.  
  296.    The generality of sexp diary entries lets you specify any diary entry
  297. that you can describe algorithmically.  Suppose you get paid on the 21st
  298. of the month if it is a weekday, and to the Friday before if the 21st is
  299. on a weekend.  The diary entry
  300.  
  301.      &%%(let ((dayname (calendar-day-of-week date))
  302.               (day (car (cdr date))))
  303.            (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
  304.                (and (memq day '(19 20)) (= dayname 5)))
  305.               ) Pay check deposited
  306.  
  307. applies to just those dates.  This example illustrates how the sexp can
  308. depend on the variable `date'; this variable is a list (MONTH DAY YEAR)
  309. that gives the Gregorian date for which the diary entries are being
  310. found.  If the value of the expression is `t', the entry applies to
  311. that date.  If the expression evaluates to `nil', the entry does *not*
  312. apply to that date.
  313.  
  314.    The following sexp diary entries take advantage of the ability (in
  315. the fancy diary display) to concoct diary entries based on the date:
  316.  
  317. `%%(diary-sunrise-sunset)'
  318.      Make a diary entry for the local times of today's sunrise and
  319.      sunset.
  320.  
  321. `%%(diary-phases-of-moon)'
  322.      Make a diary entry for the phases (quarters) of the moon.
  323.  
  324. `%%(diary-day-of-year)'
  325.      Make a diary entry with today's day number in the current year and
  326.      the number of days remaining in the current year.
  327.  
  328. `%%(diary-iso-date)'
  329.      Make a diary entry with today's equivalent ISO commercial date.
  330.  
  331. `%%(diary-julian-date)'
  332.      Make a diary entry with today's equivalent date on the Julian
  333.      calendar.
  334.  
  335. `%%(diary-astro-day-number)'
  336.      Make a diary entry with today's equivalent astronomical (Julian)
  337.      day number.
  338.  
  339. `%%(diary-hebrew-date)'
  340.      Make a diary entry with today's equivalent date on the Hebrew
  341.      calendar.
  342.  
  343. `%%(diary-islamic-date)'
  344.      Make a diary entry with today's equivalent date on the Islamic
  345.      calendar.
  346.  
  347. `%%(diary-french-date)'
  348.      Make a diary entry with today's equivalent date on the French
  349.      Revolutionary calendar.
  350.  
  351. `%%(diary-mayan-date)'
  352.      Make a diary entry with today's equivalent date on the Mayan
  353.      calendar.
  354.  
  355. Thus including the diary entry
  356.  
  357.      &%%(diary-hebrew-date)
  358.  
  359. causes every day's diary display to contain the equivalent date on the
  360. Hebrew calendar, if you are using the fancy diary display.  (With simple
  361. diary display, the line `&%%(diary-hebrew-date)' appears in the diary
  362. for any date, but does nothing particularly useful.)
  363.  
  364.    There are a number of other available sexp diary entries that are
  365. important to those who follow the Hebrew calendar:
  366.  
  367. `%%(diary-rosh-hodesh)'
  368.      Make a diary entry that tells the occurrence and ritual
  369.      announcement of each new Hebrew month.
  370.  
  371. `%%(diary-parasha)'
  372.      Make a Saturday diary entry that tells the weekly synagogue
  373.      scripture reading.
  374.  
  375. `%%(diary-sabbath-candles)'
  376.      Make a Friday diary entry that tells the *local time* of Sabbath
  377.      candle lighting.
  378.  
  379. `%%(diary-omer)'
  380.      Make a diary entry that gives the omer count, when appropriate.
  381.  
  382. `%%(diary-yahrzeit MONTH DAY YEAR) NAME'
  383.      Make a diary entry marking the anniversary of a date of death.
  384.      The date is the *Gregorian* (civil) date of death.  The diary
  385.      entry appears on the proper Hebrew calendar anniversary and on the
  386.      day before.  (In the European style, the order of the parameters
  387.      is changed to DAY, MONTH, YEAR.)
  388.  
  389. 
  390. File: xemacs.info,  Node: Appt Customizing,  Prev: Sexp Diary Entries,  Up: Calendar Customization
  391.  
  392. Customizing Appointment Reminders
  393. .................................
  394.  
  395.    You can specify exactly how Emacs reminds you of an appointment and
  396. how far in advance it begins doing so.  Here are the variables that you
  397. can set:
  398.  
  399. `appt-message-warning-time'
  400.      The time in minutes before an appointment that the reminder
  401.      begins.  The default is 10 minutes.
  402.  
  403. `appt-audible'
  404.      If this is `t' (the default), Emacs rings the terminal bell for
  405.      appointment reminders.
  406.  
  407. `appt-visible'
  408.      If this is `t' (the default), Emacs displays the appointment
  409.      message in echo area.
  410.  
  411. `appt-display-mode-line'
  412.      If this is `t' (the default), Emacs displays the number of minutes
  413.      to the appointment on the mode line.
  414.  
  415. `appt-msg-window'
  416.      If this is `t' (the default), Emacs displays the appointment
  417.      message in another window.
  418.  
  419. `appt-display-duration'
  420.      The number of seconds an appointment message is displayed.  The
  421.      default is 5 seconds.
  422.  
  423. 
  424. File: xemacs.info,  Node: Sorting,  Next: Shell,  Prev: Calendar/Diary,  Up: Top
  425.  
  426. Sorting Text
  427. ============
  428.  
  429.    XEmacs provides several commands for sorting text in a buffer.  All
  430. operate on the contents of the region (the text between point and the
  431. mark).  They divide the text of the region into many "sort records",
  432. identify a "sort key" for each record, and then reorder the records
  433. using the order determined by the sort keys.  The records are ordered so
  434. that their keys are in alphabetical order, or, for numerical sorting, in
  435. numerical order.  In alphabetical sorting, all upper-case letters `A'
  436. through `Z' come before lower-case `a', in accordance with the ASCII
  437. character sequence.
  438.  
  439.    The sort commands differ in how they divide the text into sort
  440. records and in which part of each record they use as the sort key.
  441. Most of the commands make each line a separate sort record, but some
  442. commands use paragraphs or pages as sort records.  Most of the sort
  443. commands use each entire sort record as its own sort key, but some use
  444. only a portion of the record as the sort key.
  445.  
  446. `M-x sort-lines'
  447.      Divide the region into lines and sort by comparing the entire text
  448.      of a line.  A prefix argument means sort in descending order.
  449.  
  450. `M-x sort-paragraphs'
  451.      Divide the region into paragraphs and sort by comparing the entire
  452.      text of a paragraph (except for leading blank lines).  A prefix
  453.      argument means sort in descending order.
  454.  
  455. `M-x sort-pages'
  456.      Divide the region into pages and sort by comparing the entire text
  457.      of a page (except for leading blank lines).  A prefix argument
  458.      means sort in descending order.
  459.  
  460. `M-x sort-fields'
  461.      Divide the region into lines and sort by comparing the contents of
  462.      one field in each line.  Fields are defined as separated by
  463.      whitespace, so the first run of consecutive non-whitespace
  464.      characters in a line constitutes field 1, the second such run
  465.      constitutes field 2, etc.
  466.  
  467.      You specify which field to sort by with a numeric argument: 1 to
  468.      sort by field 1, etc.  A negative argument means sort in descending
  469.      order.  Thus, minus 2 means sort by field 2 in reverse-alphabetical
  470.      order.
  471.  
  472. `M-x sort-numeric-fields'
  473.      Like `M-x sort-fields', except the specified field is converted to
  474.      a number for each line and the numbers are compared.  `10' comes
  475.      before `2' when considered as text, but after it when considered
  476.      as a number.
  477.  
  478. `M-x sort-columns'
  479.      Like `M-x sort-fields', except that the text within each line used
  480.      for comparison comes from a fixed range of columns.  An explanation
  481.      is given below.
  482.  
  483.    For example, if the buffer contains:
  484.  
  485.      On systems where clash detection (locking of files being edited) is
  486.      implemented, XEmacs also checks the first time you modify a buffer
  487.      whether the file has changed on disk since it was last visited or
  488.      saved.  If it has, you are asked to confirm that you want to change
  489.      the buffer.
  490.  
  491. then if you apply `M-x sort-lines' to the entire buffer you get:
  492.  
  493.      On systems where clash detection (locking of files being edited) is
  494.      implemented, XEmacs also checks the first time you modify a buffer
  495.      saved.  If it has, you are asked to confirm that you want to change
  496.      the buffer.
  497.      whether the file has changed on disk since it was last visited or
  498.  
  499. where the upper case `O' comes before all lower case letters.  If you
  500. apply instead `C-u 2 M-x sort-fields' you get:
  501.  
  502.      saved.  If it has, you are asked to confirm that you want to change
  503.      implemented, XEmacs also checks the first time you modify a buffer
  504.      the buffer.
  505.      On systems where clash detection (locking of files being edited) is
  506.      whether the file has changed on disk since it was last visited or
  507.  
  508. where the sort keys were `If', `XEmacs', `buffer', `systems', and `the'.
  509.  
  510.    `M-x sort-columns' requires more explanation.  You specify the
  511. columns by putting point at one of the columns and the mark at the other
  512. column.  Because this means you cannot put point or the mark at the
  513. beginning of the first line to sort, this command uses an unusual
  514. definition of `region': all of the line point is in is considered part
  515. of the region, and so is all of the line the mark is in.
  516.  
  517.    For example, to sort a table by information found in columns 10 to
  518. 15, you could put the mark on column 10 in the first line of the table,
  519. and point on column 15 in the last line of the table, and then use this
  520. command.  Or you could put the mark on column 15 in the first line and
  521. point on column 10 in the last line.
  522.  
  523.    This can be thought of as sorting the rectangle specified by point
  524. and the mark, except that the text on each line to the left or right of
  525. the rectangle moves along with the text inside the rectangle.  *Note
  526. Rectangles::.
  527.  
  528. 
  529. File: xemacs.info,  Node: Shell,  Next: Narrowing,  Prev: Sorting,  Up: Top
  530.  
  531. Running Shell Commands from XEmacs
  532. ==================================
  533.  
  534.    XEmacs has commands for passing single command lines to inferior
  535. shell processes; it can also run a shell interactively with input and
  536. output to an XEmacs buffer `*shell*'.
  537.  
  538. `M-!'
  539.      Run a specified shell command line and display the output
  540.      (`shell-command').
  541.  
  542. `M-|'
  543.      Run a specified shell command line with region contents as input;
  544.      optionally replace the region with the output
  545.      (`shell-command-on-region').
  546.  
  547. `M-x shell'
  548.      Run a subshell with input and output through an XEmacs buffer.
  549.      You can then give commands interactively.
  550.  
  551. `M-x term'
  552.      Run a subshell with input and output through an XEmacs buffer.
  553.      You can then give commands interactively.  Full terminal emulation
  554.      is available.
  555.  
  556. * Menu:
  557.  
  558. * Single Shell::         How to run one shell command and return.
  559. * Interactive Shell::    Permanent shell taking input via XEmacs.
  560. * Shell Mode::           Special XEmacs commands used with permanent shell.
  561. * Terminal emulator::    An XEmacs window as a terminal emulator.
  562. * Term Mode::            Special XEmacs commands used in Term mode.
  563. * Paging in Term::       Paging in the terminal emulator.
  564.  
  565. 
  566. File: xemacs.info,  Node: Single Shell,  Next: Interactive Shell,  Prev: Shell,  Up: Shell
  567.  
  568. Single Shell Commands
  569. ---------------------
  570.  
  571.    `M-!' (`shell-command') reads a line of text using the minibuffer
  572. and creates an inferior shell to execute the line as a command.
  573. Standard input from the command comes from the null device.  If the
  574. shell command produces any output, the output goes to an XEmacs buffer
  575. named `*Shell Command Output*', which is displayed in another window
  576. but not selected.  A numeric argument, as in `M-1 M-!', directs this
  577. command to insert any output into the current buffer.  In that case,
  578. point is left before the output and the mark is set after the output.
  579.  
  580.    `M-|' (`shell-command-on-region') is like `M-!' but passes the
  581. contents of the region as input to the shell command, instead of no
  582. input.  If a numeric argument is used to direct  output to the current
  583. buffer, then the old region is deleted first and the output replaces it
  584. as the contents of the region.
  585.  
  586.    Both `M-!' and `M-|' use `shell-file-name' to specify the shell to
  587. use.  This variable is initialized based on your `SHELL' environment
  588. variable when you start XEmacs.  If the file name does not specify a
  589. directory, the directories in the list `exec-path' are searched; this
  590. list is initialized based on the `PATH' environment variable when you
  591. start XEmacs.  You can override either or both of these default
  592. initializations in your `.emacs' file.
  593.  
  594.    When you use `M-!' and `M-|', XEmacs has to wait until the shell
  595. command completes.  You can quit with `C-g'; that terminates the shell
  596. command.
  597.  
  598. 
  599. File: xemacs.info,  Node: Interactive Shell,  Next: Shell Mode,  Prev: Single Shell,  Up: Shell
  600.  
  601. Interactive Inferior Shell
  602. --------------------------
  603.  
  604.    To run a subshell interactively with its typescript in an XEmacs
  605. buffer, use `M-x shell'.  This creates (or reuses) a buffer named
  606. `*shell*' and runs a subshell with input coming from and output going
  607. to that buffer.  That is to say, any "terminal output" from the subshell
  608. will go into the buffer, advancing point, and any "terminal input" for
  609. the subshell comes from text in the buffer.  To give input to the
  610. subshell, go to the end of the buffer and type the input, terminated by
  611. <RET>.
  612.  
  613.    XEmacs does not wait for the subshell to do anything.  You can switch
  614. windows or buffers and edit them while the shell is waiting, or while
  615. it is running a command.  Output from the subshell waits until XEmacs
  616. has time to process it; this happens whenever XEmacs is waiting for
  617. keyboard input or for time to elapse.
  618.  
  619.    To get multiple subshells, change the name of buffer `*shell*' to
  620. something different by using `M-x rename-buffer'.  The next use of `M-x
  621. shell' creates a new buffer `*shell*' with its own subshell.  By
  622. renaming this buffer as well you can create a third one, and so on.
  623. All the subshells run independently and in parallel.
  624.  
  625.    The file name used to load the subshell is the value of the variable
  626. `explicit-shell-file-name', if that is non-`nil'.  Otherwise, the
  627. environment variable `ESHELL' is used, or the environment variable
  628. `SHELL' if there is no `ESHELL'.  If the file name specified is
  629. relative, the directories in the list `exec-path' are searched (*note
  630. Single Shell Commands: Single Shell.).
  631.  
  632.    As soon as the subshell is started, it is sent as input the contents
  633. of the file `~/.emacs_SHELLNAME', if that file exists, where SHELLNAME
  634. is the name of the file that the shell was loaded from.  For example,
  635. if you use `csh', the file sent to it is `~/.emacs_csh'.
  636.  
  637.    `cd', `pushd', and `popd' commands given to the inferior shell are
  638. watched by XEmacs so it can keep the `*shell*' buffer's default
  639. directory the same as the shell's working directory.  These commands
  640. are recognized syntactically by examining lines of input that are sent.
  641. If you use aliases for these commands, you can tell XEmacs to
  642. recognize them also.  For example, if the value of the variable
  643. `shell-pushd-regexp' matches the beginning of a shell command line,
  644. that line is regarded as a `pushd' command.  Change this variable when
  645. you add aliases for `pushd'.  Likewise, `shell-popd-regexp' and
  646. `shell-cd-regexp' are used to recognize commands with the meaning of
  647. `popd' and `cd'.
  648.  
  649.    `M-x shell-resync-dirs' queries the shell and resynchronizes XEmacs'
  650. idea of what the current directory stack is.  `M-x
  651. shell-dirtrack-toggle' turns directory tracking on and off.
  652.  
  653.    XEmacs keeps a history of the most recent commands you have typed in
  654. the `*shell*' buffer.  If you are at the beginning of a shell command
  655. line and type <M-p>, the previous shell input is inserted into the
  656. buffer before point.  Immediately typing <M-p> again deletes that input
  657. and inserts the one before it.  By repeating <M-p> you can move
  658. backward through your commands until you find one you want to repeat.
  659. You may then edit the command before typing <RET> if you wish. <M-n>
  660. moves forward through the command history, in case you moved backward
  661. past the one you wanted while using <M-p>.  If you type the first few
  662. characters of a previous command and then type <M-p>, the most recent
  663. shell input starting with those characters is inserted.  This can be
  664. very convenient when you are repeating a sequence of shell commands.
  665. The variable `input-ring-size' controls how many commands are saved in
  666. your input history.  The default is 30.
  667.  
  668. 
  669. File: xemacs.info,  Node: Shell Mode,  Next: Terminal emulator,  Prev: Interactive Shell,  Up: Shell
  670.  
  671. Shell Mode
  672. ----------
  673.  
  674.    The shell buffer uses Shell mode, which defines several special keys
  675. attached to the `C-c' prefix.  They are chosen to resemble the usual
  676. editing and job control characters present in shells that are not under
  677. XEmacs, except that you must type `C-c' first.  Here is a list of the
  678. special key bindings of Shell mode:
  679.  
  680. `<RET>'
  681.      At end of buffer send line as input; otherwise, copy current line
  682.      to end of buffer and send it (`send-shell-input').  When a line is
  683.      copied, any text at the beginning of the line that matches the
  684.      variable `shell-prompt-pattern' is left out; this variable's value
  685.      should be a regexp string that matches the prompts that you use in
  686.      your subshell.
  687.  
  688. `C-c C-d'
  689.      Send end-of-file as input, probably causing the shell or its
  690.      current subjob to finish (`shell-send-eof').
  691.  
  692. `C-d'
  693.      If point is not at the end of the buffer, delete the next
  694.      character just like most other modes.  If point is at the end of
  695.      the buffer, send end-of-file as input, instead of generating an
  696.      error as in other modes (`comint-delchar-or-maybe-eof').
  697.  
  698. `C-c C-u'
  699.      Kill all text that has yet to be sent as input
  700.      (`kill-shell-input').
  701.  
  702. `C-c C-w'
  703.      Kill a word before point (`backward-kill-word').
  704.  
  705. `C-c C-c'
  706.      Interrupt the shell or its current subjob if any
  707.      (`interrupt-shell-subjob').
  708.  
  709. `C-c C-z'
  710.      Stop the shell or its current subjob if any (`stop-shell-subjob').
  711.  
  712. `C-c C-\'
  713.      Send quit signal to the shell or its current subjob if any
  714.      (`quit-shell-subjob').
  715.  
  716. `C-c C-o'
  717.      Delete last batch of output from shell (`kill-output-from-shell').
  718.  
  719. `C-c C-r'
  720.      Scroll top of last batch of output to top of window
  721.      (`show-output-from-shell').
  722.  
  723. `C-c C-y'
  724.      Copy the previous bunch of shell input and insert it into the
  725.      buffer before point (`copy-last-shell-input').  No final newline
  726.      is inserted, and the input copied is not resubmitted until you type
  727.      <RET>.
  728.  
  729. `M-p'
  730.      Move backward through the input history.  Search for a matching
  731.      command if you have typed the beginning of a command
  732.      (`comint-previous-input').
  733.  
  734. `M-n'
  735.      Move forward through the input history.  Useful when you are using
  736.      <M-p> quickly and go past the desired command
  737.      (`comint-next-input').
  738.  
  739. `<TAB>'
  740.      Complete the file name preceding point (`comint-dynamic-complete').
  741.  
  742. 
  743. File: xemacs.info,  Node: Terminal emulator,  Next: Term Mode,  Prev: Shell Mode,  Up: Shell
  744.  
  745. Interactive Inferior Shell with Terminal Emulator
  746. -------------------------------------------------
  747.  
  748.    To run a subshell in a terminal emulator, putting its typescript in
  749. an XEmacs buffer, use `M-x term'.  This creates (or reuses) a buffer
  750. named `*term*' and runs a subshell with input coming from your keyboard
  751. and output going to that buffer.
  752.  
  753.    All the normal keys that you type are sent without any interpretation
  754. by XEmacs directly to the subshell, as "terminal input."  Any "echo" of
  755. your input is the responsibility of the subshell.  (The exception is
  756. the terminal escape character, which by default is `C-c'. *note Term
  757. Mode::..)  Any "terminal output" from the subshell goes into the buffer,
  758. advancing point.
  759.  
  760.    Some programs (such as XEmacs itself) need to control the appearance
  761. on the terminal screen in detail.  They do this by sending special
  762. control codes.  The exact control codes needed vary from terminal to
  763. terminal, but nowadays most terminals and terminal emulators (including
  764. xterm) understand the so-called "ANSI escape sequences" (first
  765. popularized by the Digital's VT100 family of terminal).  The term mode
  766. also understands these escape sequences, and for each control code does
  767. the appropriate thing to change the buffer so that the appearance of
  768. the window will match what it would be on a real terminal.  Thus you
  769. can actually run XEmacs inside an XEmacs Term window!
  770.  
  771.    XEmacs does not wait for the subshell to do anything.  You can switch
  772. windows or buffers and edit them while the shell is waiting, or while
  773. it is running a command.  Output from the subshell waits until XEmacs
  774. has time to process it; this happens whenever XEmacs is waiting for
  775. keyboard input or for time to elapse.
  776.  
  777.    To make multiple terminal emulators, rename the buffer `*term*' to
  778. something different using `M-x rename-uniquely', just as with Shell
  779. mode.
  780.  
  781.    The file name used to load the subshell is determined the same way
  782. as for Shell mode.
  783.  
  784.    Unlike Shell mode, Term mode does not track the current directory by
  785. examining your input.  Instead, if you use a programmable shell, you
  786. can have it tell Term what the current directory is.  This is done
  787. automatically by bash for version 1.15 and later.
  788.  
  789. 
  790. File: xemacs.info,  Node: Term Mode,  Next: Paging in Term,  Prev: Terminal emulator,  Up: Shell
  791.  
  792. Term Mode
  793. ---------
  794.  
  795.    Term uses Term mode, which has two input modes: In line mode, Term
  796. basically acts like Shell mode.  *Note Shell Mode::.  In Char mode,
  797. each character is sent directly to the inferior subshell, except for
  798. the Term escape character, normally `C-c'.
  799.  
  800.    To switch between line and char mode, use these commands:
  801.      findex term-char-mode
  802.  
  803. `C-c C-k'
  804.      Switch to line mode.  Do nothing if already in line mode.
  805.  
  806. `C-c C-j'
  807.      Switch to char mode.  Do nothing if already in char mode.
  808.  
  809.    The following commands are only available in Char mode:
  810. `C-c C-c'
  811.      Send a literal <C-c> to the sub-shell.
  812.  
  813. `C-c C-x'
  814.      A prefix command to conveniently access the global <C-x> commands.
  815.      For example, `C-c C-x o' invokes the global binding of `C-x o',
  816.      which is normally `other-window'.
  817.  
  818. 
  819. File: xemacs.info,  Node: Paging in Term,  Prev: Term Mode,  Up: Shell
  820.  
  821. Paging in the terminal emulator
  822. -------------------------------
  823.  
  824.    Term mode has a pager feature.  When the pager is enabled, term mode
  825. will pause at the end of each screenful.
  826.  
  827. `C-c C-q'
  828.      Toggles the pager feature:  Disables the pager if it is enabled,
  829.      and vice versa.  This works in both line and char modes.  If the
  830.      pager enabled, the mode-line contains the word `page'.
  831.  
  832.    If the pager is enabled, and Term receives more than a screenful of
  833. output since your last input, Term will enter More break mode.  This is
  834. indicated by `**MORE**' in the mode-line.  Type a `Space' to display
  835. the next screenful of output.  Type `?' to see your other options.  The
  836. interface is similar to the Unix `more' program.
  837.  
  838. 
  839. File: xemacs.info,  Node: Narrowing,  Next: Hardcopy,  Prev: Shell,  Up: Top
  840.  
  841. Narrowing
  842. =========
  843.  
  844.    "Narrowing" means focusing in on some portion of the buffer, making
  845. the rest temporarily invisible and inaccessible.  Cancelling the
  846. narrowing and making the entire buffer once again visible is called
  847. "widening".  The amount of narrowing in effect in a buffer at any time
  848. is called the buffer's "restriction".
  849.  
  850. `C-x n n'
  851.      Narrow down to between point and mark (`narrow-to-region').
  852.  
  853. `C-x n w'
  854.      Widen to make the entire buffer visible again (`widen').
  855.  
  856.    Narrowing sometimes makes it easier to concentrate on a single
  857. subroutine or paragraph by eliminating clutter.  It can also be used to
  858. restrict the range of operation of a replace command or repeating
  859. keyboard macro.  The word `Narrow' appears in the mode line whenever
  860. narrowing is in effect.  When you have narrowed to a part of the
  861. buffer, that part appears to be all there is.  You can't see the rest,
  862. can't move into it (motion commands won't go outside the visible part),
  863. and can't change it in any way.  However, the invisible text is not
  864. gone; if you save the file, it will be saved.
  865.  
  866.    The primary narrowing command is `C-x n n' (`narrow-to-region').  It
  867. sets the current buffer's restrictions so that the text in the current
  868. region remains visible but all text before the region or after the
  869. region is invisible.  Point and mark do not change.
  870.  
  871.    Because narrowing can easily confuse users who do not understand it,
  872. `narrow-to-region' is normally a disabled command.  Attempting to use
  873. this command asks for confirmation and gives you the option of enabling
  874. it; once you enable the command, confirmation will no longer be
  875. required.  *Note Disabling::.
  876.  
  877.    To undo narrowing, use `C-x n w' (`widen').  This makes all text in
  878. the buffer accessible again.
  879.  
  880.    Use the `C-x =' command to get information on what part of the
  881. buffer you narrowed down.  *Note Position Info::.
  882.  
  883. 
  884. File: xemacs.info,  Node: Hardcopy,  Next: Recursive Edit,  Prev: Narrowing,  Up: Top
  885.  
  886. Hardcopy Output
  887. ===============
  888.  
  889.    The XEmacs commands for making hardcopy derive their names from the
  890. Unix commands `print' and `lpr'.
  891.  
  892. `M-x print-buffer'
  893.      Print hardcopy of current buffer using Unix command `print'
  894.      (`lpr -p').  This command adds page headings containing the file
  895.      name and page number.
  896.  
  897. `M-x lpr-buffer'
  898.      Print hardcopy of current buffer using Unix command `lpr'.  This
  899.      command does not add page headings.
  900.  
  901. `M-x print-region'
  902.      Like `print-buffer', but prints only the current region.
  903.  
  904. `M-x lpr-region'
  905.      Like `lpr-buffer', but prints only the current region.
  906.  
  907.    All the hardcopy commands pass extra switches to the `lpr' program
  908. based on the value of the variable `lpr-switches'.  Its value should be
  909. a list of strings, each string a switch starting with `-'.  For
  910. example, the value could be `("-Pfoo")' to print on printer `foo'.
  911.  
  912. 
  913. File: xemacs.info,  Node: Recursive Edit,  Next: Dissociated Press,  Prev: Hardcopy,  Up: Top
  914.  
  915. Recursive Editing Levels
  916. ========================
  917.  
  918.    A "recursive edit" is a situation in which you are using XEmacs
  919. commands to perform arbitrary editing while in the middle of another
  920. XEmacs command.  For example, when you type `C-r' inside a
  921. `query-replace', you enter a recursive edit in which you can change the
  922. current buffer.  When you exit from the recursive edit, you go back to
  923. the `query-replace'.
  924.  
  925.    "Exiting" a recursive edit means returning to the unfinished
  926. command, which continues execution.  For example, exiting the recursive
  927. edit requested by `C-r' in `query-replace' causes query replacing to
  928. resume.  Exiting is done with `C-M-c' (`exit-recursive-edit').
  929.  
  930.    You can also "abort" a recursive edit.  This is like exiting, but
  931. also quits the unfinished command immediately.  Use the command `C-]'
  932. (`abort-recursive-edit') for this.  *Note Quitting::.
  933.  
  934.    The mode line shows you when you are in a recursive edit by
  935. displaying square brackets around the parentheses that always surround
  936. the major and minor mode names.  Every window's mode line shows the
  937. square brackets, since XEmacs as a whole, rather than any particular
  938. buffer, is in a recursive edit.
  939.  
  940.    It is possible to be in recursive edits within recursive edits.  For
  941. example, after typing `C-r' in a `query-replace', you might type a
  942. command that entered the debugger.  In such a case, two or more sets of
  943. square brackets appear in the mode line(s).  Exiting the inner
  944. recursive edit (here with the debugger `c' command) resumes the
  945. query-replace command where it called the debugger.  After the end of
  946. the query-replace command, you would be able to exit the first
  947. recursive edit.  Aborting exits only one level of recursive edit; it
  948. returns to the command level of the previous recursive edit.  You can
  949. then abort that one as well.
  950.  
  951.    The command `M-x top-level' aborts all levels of recursive edits,
  952. returning immediately to the top level command reader.
  953.  
  954.    The text you edit inside the recursive edit need not be the same text
  955. that you were editing at top level.  If the command that invokes the
  956. recursive edit selects a different buffer first, that is the buffer you
  957. will edit recursively.  You can switch buffers within the recursive edit
  958. in the normal manner (as long as the buffer-switching keys have not been
  959. rebound).  While you could theoretically do the rest of your editing
  960. inside the recursive edit, including visiting files, this could have
  961. surprising effects (such as stack overflow) from time to time.  It is
  962. best if you always exit or abort a recursive edit when you no longer
  963. need it.
  964.  
  965.    In general, XEmacs tries to avoid using recursive edits.  It is
  966. usually preferable to allow users to switch among the possible editing
  967. modes in any order they like.  With recursive edits, the only way to get
  968. to another state is to go "back" to the state that the recursive edit
  969. was invoked from.
  970.  
  971. 
  972. File: xemacs.info,  Node: Dissociated Press,  Next: CONX,  Prev: Recursive Edit,  Up: Top
  973.  
  974. Dissociated Press
  975. =================
  976.  
  977.    `M-x dissociated-press' is a command for scrambling a file of text
  978. either word by word or character by character.  Starting from a buffer
  979. of straight English, it produces extremely amusing output.  The input
  980. comes from the current XEmacs buffer.  Dissociated Press writes its
  981. output in a buffer named `*Dissociation*', and redisplays that buffer
  982. after every couple of lines (approximately) to facilitate reading it.
  983.  
  984.    `dissociated-press' asks every so often whether to continue
  985. operating.  Answer `n' to stop it.  You can also stop at any time by
  986. typing `C-g'.  The dissociation output remains in the `*Dissociation*'
  987. buffer for you to copy elsewhere if you wish.
  988.  
  989.    Dissociated Press operates by jumping at random from one point in the
  990. buffer to another.  In order to produce plausible output rather than
  991. gibberish, it insists on a certain amount of overlap between the end of
  992. one run of consecutive words or characters and the start of the next.
  993. That is, if it has just printed out `president' and then decides to
  994. jump to a different point in the file, it might spot the `ent' in
  995. `pentagon' and continue from there, producing `presidentagon'.  Long
  996. sample texts produce the best results.
  997.  
  998.    A positive argument to `M-x dissociated-press' tells it to operate
  999. character by character, and specifies the number of overlap characters.
  1000. A negative argument tells it to operate word by word and specifies the
  1001. number of overlap words.  In this mode, whole words are treated as the
  1002. elements to be permuted, rather than characters.  No argument is
  1003. equivalent to an argument of two.  For your againformation, the output
  1004. goes only into the buffer `*Dissociation*'.  The buffer you start with
  1005. is not changed.
  1006.  
  1007.    Dissociated Press produces nearly the same results as a Markov chain
  1008. based on a frequency table constructed from the sample text.  It is,
  1009. however, an independent, ignoriginal invention.  Dissociated Press
  1010. techniquitously copies several consecutive characters from the sample
  1011. between random choices, whereas a Markov chain would choose randomly for
  1012. each word or character.  This makes for more plausible sounding results
  1013. and runs faster.
  1014.  
  1015.    It is a mustatement that too much use of Dissociated Press can be a
  1016. developediment to your real work.  Sometimes to the point of outragedy.
  1017. And keep dissociwords out of your documentation, if you want it to be
  1018. well userenced and properbose.  Have fun.  Your buggestions are welcome.
  1019.  
  1020. 
  1021. File: xemacs.info,  Node: CONX,  Next: Amusements,  Prev: Dissociated Press,  Up: Top
  1022.  
  1023. CONX
  1024. ====
  1025.  
  1026.    Besides producing a file of scrambled text with Dissociated Press,
  1027. you can generate random sentences by using CONX.
  1028.  
  1029. `M-x conx'
  1030.      Generate random sentences in the `*conx*' buffer.
  1031.  
  1032. `M-x conx-buffer'
  1033.      Absorb the text in the current buffer into the `conx' database.
  1034.  
  1035. `M-x conx-init'
  1036.      Forget the current word-frequency tree.
  1037.  
  1038. `M-x conx-load'
  1039.      Load a `conx' database that has been previously saved with `M-x
  1040.      conx-save'.
  1041.  
  1042. `M-x conx-region'
  1043.      Absorb the text in the current buffer into the `conx' database.
  1044.  
  1045. `M-x conx-save'
  1046.      Save the current `conx' database to a file for future retrieval.
  1047.  
  1048.    Copy text from a buffer using `M-x conx-buffer' or `M-x conx-region'
  1049. and then type `M-x conx'.  Output is continuously generated until you
  1050. type <^G>. You can save the `conx' database to a file with `M-x
  1051. conx-save', which you can retrieve with `M-x conx-load'.  To clear the
  1052. database, use `M-x conx-init'.
  1053.  
  1054. 
  1055. File: xemacs.info,  Node: Amusements,  Next: Emulation,  Prev: CONX,  Up: Top
  1056.  
  1057. Other Amusements
  1058. ================
  1059.  
  1060.    If you are a little bit bored, you can try `M-x hanoi'.  If you are
  1061. considerably bored, give it a numeric argument.  If you are very, very
  1062. bored, try an argument of 9.  Sit back and watch.
  1063.  
  1064.    When you are frustrated, try the famous Eliza program.  Just do `M-x
  1065. doctor'.  End each input by typing `RET' twice.
  1066.  
  1067.    When you are feeling strange, type `M-x yow'.
  1068.  
  1069. 
  1070. File: xemacs.info,  Node: Emulation,  Next: Customization,  Prev: Amusements,  Up: Top
  1071.  
  1072. Emulation
  1073. =========
  1074.  
  1075.    XEmacs can be programmed to emulate (more or less) most other
  1076. editors.  Standard facilities can emulate these:
  1077.  
  1078. Viper (a vi emulator)
  1079.      In XEmacs, Viper is the preferred emulation of vi within XEmacs.
  1080.      Viper is designed to allow you to take advantage of the best
  1081.      features of XEmacs while still doing your basic editing in a
  1082.      familiar, vi-like fashion.  Viper provides various different
  1083.      levels of vi emulation, from a quite complete emulation that
  1084.      allows almost no access to native XEmacs commands, to an "expert"
  1085.      mode that combines the most useful vi commands with the most
  1086.      useful XEmacs commands.
  1087.  
  1088.      To start Viper, put the command
  1089.  
  1090.           (viper-mode)
  1091.  
  1092.      in your `.emacs' file.
  1093.  
  1094.      Viper comes with a separate manual that is provided standard with
  1095.      the XEmacs distribution.
  1096.  
  1097. EDT (DEC VMS editor)
  1098.      Turn on EDT emulation with `M-x edt-emulation-on'.  `M-x
  1099.      edt-emulation-off' restores normal Emacs command bindings.
  1100.  
  1101.      Most of the EDT emulation commands are keypad keys, and most
  1102.      standard Emacs key bindings are still available.  The EDT
  1103.      emulation rebindings are done in the global keymap, so there is no
  1104.      problem switching buffers or major modes while in EDT emulation.
  1105.  
  1106. Gosling Emacs
  1107.      Turn on emulation of Gosling Emacs (aka Unipress Emacs) with `M-x
  1108.      set-gosmacs-bindings'.  This redefines many keys, mostly on the
  1109.      `C-x' and `ESC' prefixes, to work as they do in Gosmacs.  `M-x
  1110.      set-gnu-bindings' returns to normal XEmacs by rebinding the same
  1111.      keys to the definitions they had at the time `M-x
  1112.      set-gosmacs-bindings' was done.
  1113.  
  1114.      It is also possible to run Mocklisp code written for Gosling Emacs.
  1115.      *Note Mocklisp::.
  1116.  
  1117. 
  1118. File: xemacs.info,  Node: Customization,  Next: Quitting,  Prev: Emulation,  Up: Top
  1119.  
  1120. Customization
  1121. *************
  1122.  
  1123.    This chapter talks about various topics relevant to adapting the
  1124. behavior of Emacs in minor ways.
  1125.  
  1126.    All kinds of customization affect only the particular Emacs job that
  1127. you do them in.  They are completely lost when you kill the Emacs job,
  1128. and have no effect on other Emacs jobs you may run at the same time or
  1129. later.  The only way an Emacs job can affect anything outside of it is
  1130. by writing a file; in particular, the only way to make a customization
  1131. `permanent' is to put something in your `.emacs' file or other
  1132. appropriate file to do the customization in each session.  *Note Init
  1133. File::.
  1134.  
  1135. * Menu:
  1136.  
  1137. * Minor Modes::     Each minor mode is one feature you can turn on
  1138.                      independently of any others.
  1139. * Variables::       Many Emacs commands examine Emacs variables
  1140.                      to decide what to do; by setting variables,
  1141.                      you can control their functioning.
  1142. * Keyboard Macros:: A keyboard macro records a sequence of keystrokes
  1143.                      to be replayed with a single command.
  1144. * Key Bindings::    The keymaps say what command each key runs.
  1145.                      By changing them, you can "redefine keys".
  1146. * Syntax::          The syntax table controls how words and expressions
  1147.                      are parsed.
  1148. * Init File::       How to write common customizations in the `.emacs'
  1149.                      file.
  1150. * Audible Bell::    Changing how Emacs sounds the bell.
  1151. * Faces::           Changing the fonts and colors of a region of text.
  1152. * X Resources::        X resources controlling various aspects of the
  1153.                      behavior of XEmacs.
  1154.  
  1155. 
  1156. File: xemacs.info,  Node: Minor Modes,  Next: Variables,  Up: Customization
  1157.  
  1158. Minor Modes
  1159. ===========
  1160.  
  1161.    Minor modes are options which you can use or not.  For example, Auto
  1162. Fill mode is a minor mode in which <SPC> breaks lines between words as
  1163. you type.  All the minor modes are independent of each other and of the
  1164. selected major mode.  Most minor modes inform you in the mode line when
  1165. they are on; for example, `Fill' in the mode line means that Auto Fill
  1166. mode is on.
  1167.  
  1168.    Append `-mode' to the name of a minor mode to get the name of a
  1169. command function that turns the mode on or off.  Thus, the command to
  1170. enable or disable Auto Fill mode is called `M-x auto-fill-mode'.  These
  1171. commands are usually invoked with `M-x', but you can bind keys to them
  1172. if you wish.  With no argument, the function turns the mode on if it was
  1173. off and off if it was on.  This is known as "toggling".  A positive
  1174. argument always turns the mode on, and an explicit zero argument or a
  1175. negative argument always turns it off.
  1176.  
  1177.    Auto Fill mode allows you to enter filled text without breaking lines
  1178. explicitly.  Emacs inserts newlines as necessary to prevent lines from
  1179. becoming too long.  *Note Filling::.
  1180.  
  1181.    Overwrite mode causes ordinary printing characters to replace
  1182. existing text instead of moving it to the right.  For example, if point
  1183. is in front of the `B' in `FOOBAR', and you type a `G' in Overwrite
  1184. mode, it changes to `FOOGAR', instead of `FOOGBAR'.
  1185.  
  1186.    Abbrev mode allows you to define abbreviations that automatically
  1187. expand as you type them.  For example, `amd' might expand to `abbrev
  1188. mode'.  *Note Abbrevs::, for full information.
  1189.  
  1190.